import request from '@/utils/request'

export function listDorm(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/list',
    method: 'post',
    data
  })
}

export function listTreeDorm(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/list-tree',
    method: 'post',
    data
  })
}

export function getDorm(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/get',
    method: 'post',
    data
  })
}

export function postDorm(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/post',
    method: 'post',
    data
  })
}

export function patchDorm(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/patch',
    method: 'post',
    data
  })
}

export function deleteDorm(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/delete',
    method: 'post',
    data: {
      id: data
    }
  })
}

export function listBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/bed/list',
    method: 'post',
    data
  })
}

export function getBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/bed/get',
    method: 'post',
    data
  })
}

export function postBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/bed/post',
    method: 'post',
    data
  })
}

export function patchBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/bed/patch',
    method: 'post',
    data
  })
}

export function deleteBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/bed/delete',
    method: 'post',
    data: {
      id: data
    }
  })
}

export function cancelBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/opt/cancel',
    method: 'post',
    data: {
      id: data
    }
  })
}

export function arrangeBed(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/opt/arrange',
    method: 'post',
    data
  })
}

export function listBuilding(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/building/list',
    method: 'post',
    data
  })
}

export function getBuilding(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/building/get',
    method: 'post',
    data
  })
}

export function postBuilding(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/building/post',
    method: 'post',
    data
  })
}

export function patchBuilding(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/building/patch',
    method: 'post',
    data
  })
}

export function initBuilding(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/building/init-all',
    method: 'post',
    data
  })
}

export function deleteBuilding(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/building/delete',
    method: 'post',
    data: {
      id: data
    }
  })
}

export function listStorey(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/storey/list',
    method: 'post',
    data
  })
}

export function getStorey(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/storey/get',
    method: 'post',
    data
  })
}

export function postStorey(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/storey/post',
    method: 'post',
    data
  })
}

export function patchStorey(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/storey/patch',
    method: 'post',
    data
  })
}

export function deleteStorey(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/storey/delete',
    method: 'post',
    data: {
      id: data
    }
  })
}

export function listCommunity(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/community/list',
    method: 'post',
    data
  })
}

export function getCommunity(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/community/get',
    method: 'post',
    data
  })
}

export function postCommunity(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/community/post',
    method: 'post',
    data
  })
}

export function patchCommunity(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/community/patch',
    method: 'post',
    data
  })
}

export function deleteCommunity(data) {
  return request({
    baseURL: 'http://127.0.0.1:8199/api',
    url: '/dorm/community/delete',
    method: 'post',
    data: {
      id: data
    }
  })
}

